{% extends "learn_app/base.html" %}
{% block header %}
注册你的账号
{% endblock %}

{% block content %}
<form method="post" enctype="multipart/form-data" action="{% url 'users:login' %}?next={{ request.GET.next }}">
    {% csrf_token %}
    {{form.as_p}}
    {% if form.errors %}
        <div class="alert alert-danger">
            {% for field in form %}
                {% for error in field.errors %}
                    {{field.label}}:{{error}}
                {% endfor %}
            {% endfor %}
    {% endif %}
<button type="submit" class="btn btn-primary" id="login-btn">登录</button>
</form>
{% endblock %}